package com.ruoyi.basics.controller;


import com.ruoyi.basics.dto.HouseholdRegisterDto;
import com.ruoyi.basics.dto.SmsCodeDto;
import com.ruoyi.basics.service.IVerifyCodeService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

// 验证码接口类  /verifyCode/image/
@RestController
@RequestMapping("/verifyCode")
public class VerifyCodeController {
    @Autowired
    private IVerifyCodeService verifyCodeService;


    @PostMapping("/smsCode")
    public AjaxResult sendSmsCode(@RequestBody SmsCodeDto smsCodeDto){
        System.out.println(smsCodeDto+"=======================");
        try {
            verifyCodeService.sendSmsCode(smsCodeDto);
            System.out.println(smsCodeDto+"____________________");
            return new AjaxResult();
        } catch (Exception e) {
            e.printStackTrace();
            return new AjaxResult();
        }

    }


}
